#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#

"""
# 1、使用while循环输入 1 2 3 4 5 6 8 9 10
num = 1
while True:
    if num >= 11: break
    print(num, end="\t ")
    num += 1

# 2、求1-100的所有数的和
num, count_num = 0, 0
while num <= 100:
    count_num += num
    num += 1
print(count_num)

# 3、输出 1-100 内的所有奇数
num, count_num = 0, 0
while num <= 100:
    if num % 2 == 1:
        count_num += num
    num += 1
print(count_num)

# 4、输出 1-100 内的所有偶数
num, count_num = 0, 0
while num <= 100:
    if num % 2 == 0:
        count_num+=num
    num+=1
print(count_num)

# 5、求1-2+3-4+5 ... 99的所有数的和
num, count_num = 0, 0
while num <= 99:
    if num % 2 == 0:
        count_num += num
    else:
        count_num -= num
    num += 1
print(count_num)

num, count_num = 0, 0
while num <= 99:
    count_num = count_num+num if num % 2 == 0 else count_num - num
    num += 1
print(count_num)

# 6、用户登陆（三次机会重试）
count_login = 0

while True:
    if count_login >= 3: break
    name = input("请输入用户名: ")
    pwd = input("请输入密码: ")
    if name == "xiong" and pwd == "123":
        print("验证通过")
        break
    count_login += 1
    print("验证失败 {} 次".format(count_login))

# 7、九九乘法表
low = 1

while low <= 9:
    col = 1
    while col <= low:
        print("{} * {} = {}".format(col, low, col*low), end="\t")
        col += 1
    print()
    low += 1
"""
